package com.gxgy.uilt;


/**
 * @description: 处理id工具类
 * @author: Qin Fengang
 * @date: 2021-11-10
 */
public class BaseUtil {
	
	public static void main(String[] args) {
		String str = getSplitMd5("user_7d8060d972d17b9ce29317bc63145644");
		System.out.println(str);
		
		String id = getBaseId();
		System.out.println(id);
	}
	
	/**
	 * @description: 截取id被加密部分
	 * @author: Qin Fengang
	 * @date: 2021-11-10
	 */
	public static String getSplitMd5(String str) {
		String strs = str.substring(0, str.indexOf("_"));
		return str.substring(strs.length()+1,str.length());
	}
	
	
	/**
	 * @description: 封装随机生成的id
	 * @author: Qin Fengang
	 * @date: 2021-11-10
	 */
	public static String getBaseId() {
		
		return RandomId.getRandomById(13);
		
	}

}
